<template>
<view class="page">
	<u-swiper class="swiper"  :circular="true"
	:list="color" >
		
	</u-swiper>
	
	<u-notice-bar :text="tt"></u-notice-bar>
	
	<view >
		常用功能：
		<u-grid col="4"  title="常用功能">
		<u-grid-item  v-for="(item,itemIndex) in items3" :key="itemIndex" @click="click(item.url)">
			<u-icon :name="item.icon" 
			:customStyle="{paddingTop:20+'rpx'}" :size="60"></u-icon>
			<text >{{item.title}}</text>
		</u-grid-item>
	</u-grid></view>
	
</view>
</template>
<script>
	import * as dd from 'dingtalk-jsapi';
import code from '../../uni_modules/uview-ui/libs/config/props/code';
	export default {
		data() {
			return {
				items3: [
      {
        title:'房间预定',
        icon: 'https://gw.alipayobjects.com/mdn/rms_3a7189/afts/img/A*L8FjQ7lSdq4AAAAAAAAAAAAAARQnAQ',
        url:'/pages/room-list/room-list',
      },
      {
        title: '长住房申请',
        icon: 'https://gw.alipayobjects.com/mdn/rms_3a7189/afts/img/A*L8FjQ7lSdq4AAAAAAAAAAAAAARQnAQ',
        url:'/pages/bill/long-order/long-order',
      },
      {
        title: '假期订房',
        icon: 'https://gw.alipayobjects.com/mdn/rms_3a7189/afts/img/A*L8FjQ7lSdq4AAAAAAAAAAAAAARQnAQ',
       url:'/pages/room-list/room-list'
      },
    ],
	color:['/static/swiper.jpg','/static/swiper2.png',],
	tt:'文本溢出时，开启循环滚动。文字不够继续添加文字凑数。',
	value1: 0,
	authCode:'',				
				
				
			}
		},
		onReady() {
		
			// 钉钉免登
			// dd.getAuthCode({
			// 				corpId: 'ding0a40cdce33c8deb624f2f5cc6abecb85',
			// 				success: (res) => {
			// 					    const {code}=res;
									
			// 						uni.request({
			// 							url:`http://localhost:8088/system/dingding/v2/user/${code}`,
			// 							success:(res)=> {
			// 								const{name}=res.data.result
											
			// 							}
										
			// 						})
			// 								  },
			// 			    fail: () => {uni.request({
			// 							url:'http://localhost:8088/system/dingding/login',
			// 							method:'GET'
			// 						})},
			// 				complete: () => {},
			// 				});
							
							

			
		},
		methods: {
			click(url){
				uni.$u.route(url);
				
			}
			
	
		},
		
		
	}

</script>
<style lang="scss">
	.page{
		.swiper{padding-left: 45rpx;
		padding-right: 45rpx;
		}
		
	}
</style>